package com.utils;

import org.junit.Test;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class PrepareLast {
    @Test
    public void dsf(){
        Connection conn;
        PreparedStatement pst;
        try{
            conn=JdbcUtils.getConnection();
            String Sql="select * from judge where id=?";
            pst=conn.prepareStatement(Sql);
            pst.setInt(1,32);
            ResultSet resultSet = pst.executeQuery();
            while(resultSet.next()){
                System.out.println(resultSet.getString(2));
            }

        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
    }
}
